import request from '@/utils/request';
import {addGiftInter, changeActivityInter, getGiftsInter, getLotteryListInter, hexiaoInter} from "@/api/interface/interFace";
import {getToken} from "@/utils/auth";
export function changeActivityInfo(query:changeActivityInter) {
    return request({
        url: '/jsActivity',
        method: 'put',
        data: query,
        headers:{
            ContentType:"Bearer "+getToken()
        }
    });
}
export function getGiftsFn(query:getGiftsInter){
    return request({
        url: '/jsActivityPrize/list',
        method: 'get',
        params: query,

    });
}
export function addGiftFn(query:addGiftInter){
    return request({
        url: '/jsActivityPrize',
        method: 'post',
        data: query,

    });
}
export function getLotteryList(query:getLotteryListInter){
    return request({
        url: '/jsActivityRecord/list',
        method: 'get',
        params: query,

    });
}
export function hexiaoLottery(query:hexiaoInter){
    return request({
        url: '/jsActivityRecord/exchange',
        method: 'put',
        data: query,

    });
}
